/*
	author: TangQiao , Wind @ Beijing Normal University

	problem name: All in All
	
	source : BNU Online Judge
	
	problem type: 模拟题
	
	problem description: 判断一个字符串中的字符是否按同样顺序出现在另一个串中.
	
	problem solution: 两个FOR就行了.
	
	date : 2005.7.25 北师大个人练习赛11
	
*/
#include <stdio.h>
#include <string.h>

main()
{
	char s1[100005],s2[100005];
	int len1,len2;
	int i,j;
	int find;

	while (scanf("%s%s", s1, s2)!=EOF)
	{
		find=0;
		len1=strlen(s1);
		len2=strlen(s2);
		j=0;
		for (i=0;i<len1;i++)
		{
			for ( ;j<len2;j++)
				if (s1[i]==s2[j])
				{
					j++;
					find++;
					break;
				}
		}
		if (find==len1) printf("Yes\n");
		else printf("No\n");
		

	}

	return 0;
}